package bancosys.tec.persist.entities.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import jmine.tec.persist.annotation.Alias;
import jmine.tec.persist.annotation.View;
import bancosys.tec.persist.bussobj.PersistableBusinessObject;

/**
 * @author lundberg
 */
@Entity
@View
@Table(name = "VIEW_ENTITY")
@Alias("VIEWEN")
public class ViewEntity extends PersistableBusinessObject {
    private Long id;

    private String name;

    private Integer answer;

    /**
     * Devolve o id do bean.
     * 
     * @return o id do bean.
     */
    @Id
    @Column(name = "COD_VIEW_ENTITY")
    public Long getId() {
        return this.id;
    }

    /**
     * @return o nome do bean.
     */
    @Column(name = "NOME")
    public String getName() {
        return this.name;
    }

    /**
     * Define o name.
     * 
     * @param name O name a ser definido.
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Define o id.
     * 
     * @param id O id a ser definido.
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the answer
     */
    @Column(name = "ANSWER_TO_LIFE")
    public Integer getAnswer() {
        return this.answer;
    }

    /**
     * @param answer the answer to set
     */
    public void setAnswer(Integer answer) {
        this.answer = answer;
    }
}
